/**
 * created by 小卷毛, 2020-05-28 028
 * Copyright (c) 2020, 416143467@qq.com All Rights Reserved.
 * #                   *********                            #
 * #                  ************                          #
 * #                  *************                         #
 * #                 **  ***********                        #
 * #                ***  ****** *****                       #
 * #                *** *******   ****                      #
 * #               ***  ********** ****                     #
 * #              ****  *********** ****                    #
 * #            *****   ***********  *****                  #
 * #           ******   *** ********   *****                #
 * #           *****   ***   ********   ******              #
 * #          ******   ***  ***********   ******            #
 * #         ******   **** **************  ******           #
 * #        *******  ********************* *******          #
 * #        *******  ******************************         #
 * #       *******  ****** ***************** *******        #
 * #       *******  ****** ****** *********   ******        #
 * #       *******    **  ******   ******     ******        #
 * #       *******        ******    *****     *****         #
 * #        ******        *****     *****     ****          #
 * #         *****        ****      *****     ***           #
 * #          *****       ***        ***      *             #
 * #            **       ****        ****                   #
 */
package com.zhiyou.aifeng.view

import android.app.Activity
import android.content.Context
import android.view.ViewManager
import com.zhpan.bannerview.BannerViewPager
import com.zhpan.bannerview.BaseViewHolder
import org.jetbrains.anko.custom.ankoView

inline fun <T : Any> ViewManager.bannerViewPager(
    theme: Int = 0,
    init: BannerViewPager<T, BaseViewHolder<T>>.() -> Unit = {}
) =
    ankoView({ BannerViewPager(it) }, theme, init)

inline fun <T : Any> Context.bannerViewPager(
    theme: Int = 0,
    init: BannerViewPager<T, BaseViewHolder<T>>.() -> Unit = {}
) =
    ankoView({ BannerViewPager(it) }, theme, init)

inline fun <T : Any> Activity.bannerViewPager(
    theme: Int = 0,
    init: BannerViewPager<T, BaseViewHolder<T>>.() -> Unit = {}
) =
    ankoView({ BannerViewPager(it) }, theme, init)